﻿using System;
using System.Windows;
using System.Windows.Input;

namespace DeSleeper.Client.Framework
{
    public class CommandMessage : DependencyObject
    {
        public ICommand AssociatedCommand { get; private set; }
        public CommandMessageType MessageType { get; private set; }
        public string Message { get; private set; }

        public CommandMessage(ICommand associatedCommand, CommandMessageType messageType, string message)
        {
            AssociatedCommand = associatedCommand;
            MessageType = messageType;
            Message = message;
        }


        //public static readonly RoutedEvent DismissingEvent = EventManager.RegisterRoutedEvent(
        //    "Dismissing", RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (CommandMessage));

        //// Provide CLR accessors for the event
        //public event RoutedEventHandler Dismissing
        //{
        //    add { AddHandler(DismissingEvent, value); }
        //    remove { RemoveHandler(DismissingEvent, value); }
        //}

        //public void InvokeDismissing(EventArgs e)
        //{
        //    var handler = Dismissing;
        //    if (handler != null) handler(this, e);
        //}
    }
}